package com.atguigu.classroom.wechat.utils;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class WeChatPropertiesUtils implements InitializingBean {
    @Value("${wechat.mpAppId}")
    private String mpAppId;
    @Value("${wechat.mpAppSecret}")
    private String mpAppSecret;
    @Value("${wechat.token}")
    private String token;

    public static String MPAPPID;
    public static String MPAPPSECRET;
    public static String TOKEN;
    @Override
    public void afterPropertiesSet() throws Exception {
        MPAPPID=mpAppId;
        MPAPPSECRET=mpAppSecret;
        TOKEN=token;
    }
}
